package cn.yj.common.entity;

import cn.yj.common.emums.PayType;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.StringJoiner;

/**
 * @author 永健
 * @since 2022-02-19 17:23
 */
public class PayRefundOrder implements Serializable {

    /**
     * 商户订单编号
     */
    private String outTradeNo;

    private BigDecimal refundAmount;

    /**
     * 支付宝订单还是微信订单
     */
    private PayType payType;

    private String errMsg;

    /**
     * 支付宝和微信两个值不同主要看 success的值
     */
    private String status;

    private String outRefundNo;

    /**
     * 可以忽略判断  status 直接判断 success
     */
    private boolean success;

    public String getOutTradeNo() {
        return outTradeNo;
    }

    public PayRefundOrder setOutTradeNo(String outTradeNo) {
        this.outTradeNo = outTradeNo;
        return this;
    }

    public PayType getPayType() {
        return payType;
    }

    public PayRefundOrder setPayType(PayType payType) {
        this.payType = payType;
        return this;
    }

    public String getErrMsg() {
        return errMsg;
    }

    public PayRefundOrder setErrMsg(String errMsg) {
        this.errMsg = errMsg;
        return this;
    }

    public String getStatus() {
        return status;
    }

    public PayRefundOrder setStatus(String status) {
        this.status = status;
        return this;
    }

    public boolean isSuccess() {
        return success;
    }

    public PayRefundOrder setSuccess(boolean success) {
        this.success = success;
        return this;
    }

    public String getOutRefundNo() {
        return outRefundNo;
    }

    public PayRefundOrder setOutRefundNo(String outRefundNo) {
        this.outRefundNo = outRefundNo;
        return this;
    }

    public BigDecimal getRefundAmount() {
        return refundAmount;
    }

    public PayRefundOrder setRefundAmount(BigDecimal refundAmount) {
        this.refundAmount = refundAmount;
        return this;
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", PayRefundOrder.class.getSimpleName() + "[", "]").add("outTradeNo='" + outTradeNo + "'").add("refundAmount=" + refundAmount).add("payType=" + payType).add("errMsg='" + errMsg + "'").add("status='" + status + "'").add("outRefundNo='" + outRefundNo + "'").add("success=" + success).toString();
    }
}
